util: fix encounter start bug in make/test timeline scripts #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should address the encounter sync drift referenced in quisquous#5635 and quisquous#6048, as well as the missing zone-seal sync referenced in quisquous#5716.
There were a couple of separate but related issues that I found:
encounter_tools
had not (yet) been updated to use InCombat lines to start encounters, even thoughmake_timeline
is inserting an InCombat sync at the start of a new timeline.encounter_tools
would fall back on usingplayerAttackingMob
ormobAttackingPlayer
regex. While this mostly still worked (with minor drift issues), it was also counting faerie healing actions as the start of the fight. I confirmed this was the case with the log in make/test timeline has weird offset with log file quisquous/cactbot#6048. I don't have logs for the original report from make_timeline/test_timeline drift quisquous/cactbot#5635, but I suspect a similar cause there, as I was unable to repro in e6n when on non-pet classes.encounter_tools
re: pushing the fight-starting log line intologLines
. When encountering certain log lines that should trigger a new fight encounter,onStartFight()
would reinitializethis.currentFight
and set the.startTime
property; and whenstoreStartLine()
was subsequently called, it would not push the starting log line into.logLines[]
because the fight already had a start time set. This was causing make/test_timeline to sometimes not have access to (and not be able to sync on) the log line that started the encounter.I'm wary about unintentional breakage, given the various different events that should (or should not) start a timeline. cc: @xiashtra and @JLGarber, would appreciate an extra set of eyes.